function checkForm(select) {

    var validationTypes = [
        {
            type: 'Email',
            regex: /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,
            check: function(_value) {
                return this.regex.test(_value);
            },
        },
        {
            type: 'Password',
            regex: /^(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{3,15}$/,
            check: function(_value) {
                return this.regex.test(_value);
            },
        },
        {
            type: 'Nickname',
            regex: /^\w{3,15}$/,
            check: function(_value) {
                return this.regex.test(_value);
            },            
        },
        {
            type: 'Field',
            regex: /^[^~,]{3,300}$/,
            check: function(_value) {
                return this.regex.test(_value);
            }            
        }
    ];

        function find(elem, elemClass, parentName, parentClass) {
            while (elem.nodeName != parentName.toUpperCase() || elem.className.indexOf(parentClass) == -1) {
                elem = elem.parentNode;
            }
            for (var q = 0; q < elem.children.length; q++) {
                if (elem.children[q].className.split(' ')[0] == elemClass) {
                    elem = elem.children[q];
                }
            } 
            return elem.innerHTML = errorMessage(val);
        }

        var errorMessage = function(value) {
            if (value == '') {
                if (elementsToValid[i].className.indexOf('error') == -1) {
                    elementsToValid[i].className += ' error';
                }
                    return 'This field cannot be empty';
            } else
            if (!tmpResult) {
                if (elementsToValid[i].className.indexOf('error') == -1) {
                    elementsToValid[i].className += ' error';
                }
                    return validationTypes[j].type + ' is not valid';
            } else {
                if (elementsToValid[i].className.indexOf('error') != -1) {
                    elementsToValid[i].className = 'form-input';
                }
                    return '';
            }
        }

    var elementsToValid = dom('A[data-validation-' + select + ']').elements,
        result = true,
        validateType,
        val,
        tmpResult;

    for (var i = 0; i < elementsToValid.length; i++) {
        validateType = elementsToValid[i].getAttribute('data-validation-' + select);
        val = elementsToValid[i].value;
        
        for (var j = 0; j < validationTypes.length; j++) {
            if (validateType == validationTypes[j].type.toLowerCase()) {
                tmpResult = validationTypes[j].check(val);
                find(elementsToValid[i], 'error-message', 'span', 'area')
                if (result != false) {
                    result = tmpResult;
                } 
            }
        }
    }
    return result;
};